package come.myStudy;

public class Program {

	public static void main(String[] args) {
		Pont2D p1 = new Pont2D();//
		p1.setX(23);
		Pont2D p2 = new Pont2D(4,9);
		System.out.printf("第一个点是[%d,%d]\r\n", p1.getX(),p1.getY());
		
		System.out.printf("第二个点是%s\r\n",p2);
	    
		System.out.println("p2距离原点的距离是"+p2.distanceFromOrigin());
		System.out.printf("%s,%s距离的距离是%.5f",p1,p2,new Util().distanceBetweenTwoPoints(p1,p2));
		System.out.println("p2距离原点的距离是"+p2.distanceFromOrigin());
		p1.transform(-30, -50);
		System.out.println("p1偏移之后位置是"+p1);
		Pont2D p3= p2.mirror();
		System.out.println("p2镜像后的位置是"+p3);
		
		Line l1 = new Line();
		Line l2 = new Line(p1,p2);
		Line l3 = new Line(23,90,0,8);
		System.out.println("l3 的长度是"+l3.ComputeDistance());
		
		Pont2D center = new Pont2D(4,4);
		Circle c1 = new Circle(center,4);
		System.out.printf("c1 的面积是%.2f\r\n",c1.ComputeArea());
		System.out.printf("c1 的周长是%.2f",c1.ComputeGirth());
		
	}

}
